package com.quzitech.efest.activitys.slidedrawer;

import android.graphics.Color;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.RelativeLayout;

import com.quzitech.efest.R;
import com.quzitech.efest.activitys.base.BaseActivity;
import com.quzitech.efest.activitys.base.ViewInject;
import com.quzitech.efest.utils.Myutil;
import com.quzitech.efest.view.TitleBar;

public class AboutActivity extends BaseActivity {
	@ViewInject(id = R.id.tb_main)
	TitleBar tb_main;
	@ViewInject(id = R.id.rela_about_aboutus, click = true)
	RelativeLayout rela_about_aboutus;
	@ViewInject(id = R.id.rela_about_agentcontact, click = true)
	RelativeLayout rela_about_agentcontact;
//	@ViewInject(id = R.id.rela_about_rateus, click = true)
//	RelativeLayout rela_about_rateus;
	@ViewInject(id = R.id.rela_about_softwareinfo, click = true)
	RelativeLayout rela_about_softwareinfo;

	@Override
	protected int getlayout() {

		return R.layout.layout_about;
	}

	private void initTitleBar() {
		tb_main.setBackgroundColor(getResources().getColor(R.color.titlebar));
		tb_main.setLeftImageResource(R.drawable.main_leftback);
		tb_main.setDividerColor(Color.GRAY);
		tb_main.setTitleColor(getResources().getColor(R.color.WHITE));
		tb_main.setLeftClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				finish();
			}
		});
		tb_main.setTitle(R.string.main_slide_about);

	}

	@Override
	public void onClick(View v) {
		super.onClick(v);
		switch (v.getId()) {
		case R.id.rela_about_aboutus:
			Myutil.SearchUrl(
					getResources().getString(R.string.about_aboutus_net),
					getApplicationContext());
			// ToastMsg_short("rela_about_aboutus");
			break;
		case R.id.rela_about_agentcontact:
			// ToastMsg_short("rela_about_agentcontact");
			Myutil.SearchUrl(
					getResources().getString(R.string.about_agent_net),
					getApplicationContext());
			break;
//		case R.id.rela_about_rateus:
//			ToastMsg_short("rela_about_rateus");
//			break;
		case R.id.rela_about_softwareinfo:
			nextActivity(InformationActivity.class);
			break;

		default:
			break;
		}
	}

	@Override
	protected void initData() {
		initTitleBar();

	}

}
